<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pForm.jsp" %>
<%@ include file="/WEB-INF/jsp/include/easyui-layui-upload.jsp" %>
<script src="/plug-in/jquery-easyui-1.5.1/plugins/jquery.choosebox.js"></script>
<title>发票新增页面</title>
<style type="text/css"> .textbox-label { width: 85px; }</style>
<script>
	$(function(){
	});
	function onOrgNoSelect(record){
		$('input[name=department]').val(record.orgName);	       
	}
</script>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<!-- 替换自动form表单 -->
		<form id="easyuiForm" method="post" action="/console/com.fs.jzzn.pojo.Invoice/newAdd"   >
		 <!--类名属性及默认主键id-->
		 <input type="hidden" name="className" value="com.fs.jzzn.pojo.Invoice" />
		 <input type="hidden" name="id" value="" />
		 <input type="hidden" name="createrId" value="${SESSION_USER.user.id}" />
		 <input type="hidden" name="billKind" value="" />
		 <input type="hidden"  name="department" value="" />
		  
		 <div style="margin-bottom:20px">
		 	<input class="easyui-choosebox easyui-validatebox" name="pNo" style="width:370px;"   data-options="label:'对象编号:',boxWidth:900,boxHeight:400,boxTitle:'请选择项目(合同)',attr:'billKind',textField:'pNo',valueField:'pNo',modleName:'number',required:true,callback:fn.selectDepartmant "/>
		  	<input class="easyui-textbox easyui-validatebox" name="signNo" style="width:370px;" data-options="label:'外经证:',required:true" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		  	<input class="easyui-textbox easyui-validatebox" name="billTitle" style="width:370px;" data-options="label:'发票标题(总):',required:true,validType:'length[0,45]'" />
		  	<input class="easyui-textbox easyui-validatebox" name="billTitleF" style="width:370px;" data-options="label:'开票标题(分):',validType:'length[0,45]'" />
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<input class="easyui-textbox easyui-validatebox" name="billNo" style="width:370px;" data-options="label:'开票编号(总):',required:true,validType:'length[0,200]'" />
		  	<input class="easyui-textbox easyui-validatebox" name="billNoF" style="width:370px;" data-options="label:'开票编号(分):',validType:'length[0,45]'" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		  	<input class="easyui-datebox easyui-validatebox" name="billDate" style="width:370px;" data-options="label:'开票日期(总):',required:true" />
		  	<input class="easyui-datebox easyui-validatebox" name="billDateF" style="width:370px;" data-options="label:'开票日期(分):'" />
		 </div>
		
		<div style="margin-bottom:20px">
		  	<input class="easyui-numberbox easyui-validatebox" name="money" style="width:370px;" data-options="label:'开票金额(总):',required:true,precision:2" />
		  	<input class="easyui-numberbox easyui-validatebox" name="moneyF" style="width:370px;" data-options="label:'开票金额(分):',precision:2" />
		 </div>		 
		 
		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" name="billType" style="width:370px;" data-options="label:'发票类型(总):'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B7&pCode_searchType=eq" >
		 	</select>
		  	<select class="easyui-combobox" name="billTypeF" style="width:370px;" data-options="label:'发票类型(分):'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B7&pCode_searchType=eq" >
		 	</select>
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" name="taxRate" style="width:370px;" data-options="label:'税率(总):'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B8&pCode_searchType=eq" >
		 	</select>
		 	<select class="easyui-combobox" name="taxRateF" style="width:370px;" data-options="label:'税率(分):'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B8&pCode_searchType=eq" >
		 	</select>
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<input class="easyui-textbox easyui-validatebox" name="billName" style="width:370px;" data-options="label:'开票单位(总):'" />
		  	<input class="easyui-textbox easyui-validatebox" name="billNameF" style="width:370px;" data-options="label:'开票单位(分):'" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		  	<input class="easyui-textbox easyui-validatebox" name="operator" style="width:370px;" data-options="label:'经办人(总):'" />
		  	<input class="easyui-textbox easyui-validatebox" name="operatorF" style="width:370px;" data-options="label:'经办人(分):'" />
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<select class="easyui-combotreegrid" name="orgNo" style="width:370px;" data-options="label:'组织结构:',panelWidth:300,panelWidth:450,required:true,
	           	idField: 'orgNo', 
	           	missingMessage:'必填项',
				treeField: 'orgName',
				sortName:'orgOrder',
				onSelect:function(row){
					$('input[name=department]').val(row.orgName);	    
				},
				sortOrder:'asc',
	            url:'/console/com.fs.base.pojo.Org/list', 
	            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
	            columns:[[    
	                {field:'orgName',			width:190,	title:'组织名称' }
		         	,{field:'orgType',			width:70,	title:'分类' }
		         	,{field:'orgNo',				width:100,	title:'组织编码' }
		         	,{field:'orgLeaderName',	width:70,	title:'负责人'}
	            ]]"></select>
		 	<input class="easyui-textbox easyui-validatebox" name="url" style="width:370px;" data-options="label:'云储存:'" />
		  </div>
		 
		 <div style="margin-bottom:20px">
		 	<input  class="easyui-autoCode"  name="invoiceNo" style="width:370px;" data-options="label:'单据编号:',required:true,prefix:'FP',timestamp:'yyMMddHHmmss' "/>
		 	<input class="easyui-textbox easyui-validatebox" name="remark" multiline="true" style="width:370px;height:40px;" data-options="label:'备注:',required:false,validType:'length[0,500]'" />
		 </div>
		 <div style="margin-bottom:20px">
		 	<input class="easyui-layuiupload" name="attachment" style="width:760px;" data-options="label:'附件:',upload:{auto:false,height:250}" />
		 </div>
		</form>
	</div>
</body>
</html>